<?php
if (isset($_SESSION['admin']) && $_SESSION['admin'] == 1)
{
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 <tr bgcolor="#000000"> 
  <td width="100%"> 
   <table border="0" width="100%">
    <tr bgcolor="#333333"> 
     <td valign="bottom" colspan="2" > 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr valign="middle"> 
        <td align="left" bgcolor="#333333">
         <a href="index.php?section=admin&mode=stats">Статистика</a> |
         <a href="index.php?section=admin&mode=games">Игры</a> |
         <a href="index.php?section=admin&mode=application">Заявки</a> |
         <a href="index.php?section=admin&mode=users">Пользователи</a> |
         <a href="index.php?section=admin&mode=config">Настройки</a> 
        </td>
        </tr>
      </table>
     </td>
    </tr>
   </table>
  </td>
 </tr>
</table>

<?php
switch ($_GET['mode']) {
		case "stats": 
		require ("admin_stats.php");
		break;
        case "games": 
		require ("games_main.php");
        break;
        case "newgame": 
		require ("games_add.php");
        break;		
        case "editgame": 
		require ("games_edit.php");
        break;	
        case "users": 
		require ("admin_users.php");
		break;
		case "config": 
		require ("admin_conf.php");
		break;
		case "application": 
		require ("admin_appl.php");
		break;
        case "applicationold": 
		require ("admin_applold.php");
		break;
		default:
		require ("admin_stats.php");}
}
else print ('Время вашей сессии истекло!');

?>